package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.project.system.domain.SmIdentity;
import com.ruoyi.project.system.mapper.SmIdentityMapper;
import com.ruoyi.project.system.service.ISmIdentityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 区域队长起止时间Service业务层处理
 *
 */
@Service
public class SmIdentityServiceImpl implements ISmIdentityService
{
    @Autowired
    private SmIdentityMapper smIdentityMapper;

    /**
     * 查询区域队长起止时间
     * 
     * @param id 区域队长起止时间主键
     * @return 区域队长起止时间
     */
    @Override
    public SmIdentity selectSmIdentityById(Integer id)
    {
        return smIdentityMapper.selectSmIdentityById(id);
    }

    /**
     * 查询区域队长起止时间列表
     * 
     * @param smIdentity 区域队长起止时间
     * @return 区域队长起止时间
     */
    @Override
    public List<SmIdentity> selectSmIdentityList(SmIdentity smIdentity)
    {
        return smIdentityMapper.selectSmIdentityList(smIdentity);
    }

    @Override
    public int insertSmIdentity(SmIdentity smIdentity) {
        return smIdentityMapper.insertSmIdentity(smIdentity.getUserId(),smIdentity.getRemark(),smIdentity.getType());
    }

    /**
     * 修改区域队长起止时间
     * 
     * @param smIdentity 区域队长起止时间
     * @return 结果
     */
    @Override
    public int updateSmIdentity(SmIdentity smIdentity)
    {
        return smIdentityMapper.updateSmIdentity(smIdentity);
    }

}
